package com.business.service.interfaced.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import com.business.service.interfaced.ApplyForInManager;
import com.system.dao.DaoSupport;
import com.system.util.PageData;
/** 
 * 说明： 入驻审核表
 * 创建人：于泓磊
 * 创建时间：2018-02-01
 * @version
 */
@Service("applyforInService")
public class ApplyForInService implements ApplyForInManager{

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/**新增
	 * @param pd
	 * @throws Exception
	 */
	public void save(PageData pd)throws Exception{
		dao.save("ApplyForInMapper.save", pd);
	}
	
	/**删除
	 * @param pd
	 * @throws Exception
	 */
	public void delete(PageData pd)throws Exception{
		dao.delete("ApplyForInMapper.delete", pd);
	}
	
	/**修改
	 * @param pd
	 * @throws Exception
	 */
	public void edit(PageData pd)throws Exception{
		dao.update("ApplyForInMapper.edit", pd);
	}
	
	/**列表全部(是否审核（0表示未审核，1审核通过，2审核驳回）)
	 * @param pd
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> listAll(PageData pd)throws Exception{
		return (List<PageData>)dao.findForList("ApplyForInMapper.listAll", pd);
	}
	
	/**通过id获取数据
	 * @param pd
	 * @throws Exception
	 */
	public PageData findById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("ApplyForInMapper.findById", pd);
	}
	
	/**批量删除
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
		dao.delete("ApplyForInMapper.deleteAll", ArrayDATA_IDS);
	}

	/**
	 * 根据用户id获取申请信息
	 */
	@Override
	public PageData getApplyInfo(PageData pd) throws Exception {
		return (PageData)dao.findForObject("ApplyForInMapper.getApplyInfo", pd);
	}
	
}

